﻿@inject IStringLocalizer<DropdownAlignment> Localizer

<div class="row form-inline form-inline-end g-3">
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string"
                  Items="Items"
                  Color="Color.Secondary"
                  MenuAlignment="Alignment.Left"
                  Direction="Direction.Dropdown"
                  ShowLabel="true" DisplayText="Start" />
    </div>
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string"
                  Items="Items"
                  Color="Color.Secondary"
                  MenuAlignment="Alignment.Right"
                  Direction="Direction.Dropdown"
                  ShowLabel="true" DisplayText="End" />
    </div>
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string"
                  Items="Items"
                  Color="Color.Secondary"
                  MenuAlignment="Alignment.Center"
                  Direction="Direction.Dropdown"
                  ShowLabel="true" DisplayText="Center" />
    </div>
    <div class="col-6 col-sm-4 col-md-3">
        <Dropdown TValue="string"
                  Items="Items"
                  Color="Color.Secondary"
                  MenuAlignment="Alignment.Center"
                  Direction="Direction.Dropup"
                  ShowLabel="true"
                  DisplayText="Center" />
    </div>
</div>

@code {
    private List<SelectedItem> Items { get; set; } = new List<SelectedItem> { };

    /// <summary>
    /// OnInitialized
    /// </summary>
    protected override void OnInitialized()
    {
        base.OnInitialized();

        Items = new List<SelectedItem>
        {
            new SelectedItem{ Text=Localizer["Item1"], Value="0"},
            new SelectedItem{ Text=Localizer["Item2"], Value="1"},
            new SelectedItem{ Text=Localizer["Item3"], Value="2"},
        };
    }
}
